# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=dbus-glib
pkgver=0.112
pkgrel=6
pkgdesc="GLib bindings for DBUS"
options="!check" # FIXME: tests fails
url="https://www.freedesktop.org/wiki/Software/DBusBindings"
arch="all"
license="AFL-2.1 OR GPL-2.0-or-later"
subpackages="$pkgname-dev $pkgname-doc"
makedepends="dbus-dev glib-dev gettext-dev expat-dev"
source="https://dbus.freedesktop.org/releases/dbus-glib/dbus-glib-$pkgver.tar.gz"

build() {
	CFLAGS="$CFLAGS -flto=auto" \
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc \
		--localstatedir=/var \
		--enable-static=no \
		--enable-bash-completion=no
	make
}

check() {
	make check
}

package() {
	make DESTDIR="$pkgdir" install
}

dev() {
	default_dev

	amove usr/bin/dbus-binding-tool
}

sha512sums="
7c9f393f065dfb3d698f35e6554caf15fe539f5dd52d2b2bb6ed1770e130f5dab8e45379232520301455bae9bb77e25a109faf175153fcd4b9dd11d7de4a546e  dbus-glib-0.112.tar.gz
"
